home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
- <html lang="en">
- <head>
- <title>Properties</title>
- </head>
- <body bgcolor="#FFFFFF" link="#000099" vlink="#555555">
- <dtml-var manage_tabs>
-
- <dtml-if Principia-Version>
- <p>
- <em>You are currently working in version <dtml-var Principia-Version></em>
- </p>
- </dtml-if Principia-Version>
-
- <form action="<dtml-var URL1>" method="POST">
- <dtml-if propertyMap>
- <p>
- Properties allow you to assign simple values to Zope objects.
- The following properties are defined for this item.
- <dtml-if property_extensible_schema__>
- To <a href="#addpropform">
- add a new property</a>, enter a name, type and value for the new property
- and click the "Add" button.
- </dtml-if>
- To change property values, edit the
- values and click "Save Changes".
- </p>
- <table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <th colspan="3">Property</th>
- <th>Type</th>
- </tr>
-
- <dtml-in propertyMap mapping>
- <tr>
- <td align="left" valign="top" width="16">
- <dtml-if "'d' in _['sequence-item'].get('mode', 'awd')">
- <input type="checkbox" name="ids:list" value="<dtml-var id html_quote>" ID="cb-<dtml-var id>">
- <dtml-else>
- </dtml-if>
- </td>
- <td align="left" valign="top">
- <strong><LABEL FOR="cb-<dtml-var id>"><dtml-var "propertyLabel(id)"></LABEL></strong>
- </td>
- <td align="left" valign="top">
- <dtml-if "'w' in _['sequence-item'].get('mode', 'awd')">
- <dtml-if "type == 'int'">
- <input type="text" name="<dtml-var id>:<dtml-var type>" size="35"
- value="<dtml-if "hasProperty(id)"><dtml-var
- "'%s' % getProperty(id)" html_quote></dtml-if>">
- <dtml-elif "type == 'long'">
- <input type="text" name="<dtml-var id>:<dtml-var type>" size="35"
- value="<dtml-if "hasProperty(id)"><dtml-var
- "('%s' % getProperty(id))[:-1]" html_quote></dtml-if>">
- <dtml-elif "type in ('float', 'date')">
- <input type="text" name="<dtml-var id>:<dtml-var type>" size="35"
- value="<dtml-var "getProperty(id)" html_quote>">
- <dtml-elif "type=='string'">
- <input type="text" name="<dtml-var id>:string" size="35"
- value="<dtml-var "getProperty(id)" html_quote>">
- <dtml-elif "type=='boolean'">
- <input type="checkbox" name="<dtml-var id>:boolean" size="35"
- <dtml-if "getProperty(id)">CHECKED</dtml-if>>
- <dtml-elif "type=='tokens'">
- <input type="text" name="<dtml-var id>:tokens" size="35"
- value="<dtml-in "getProperty(id)"><dtml-var sequence-item html_quote> </dtml-in>">
- <dtml-elif "type=='text'">
- <textarea name="<dtml-var id>:text" rows="6" cols="35"><dtml-var
- "getProperty(id)" html_quote></textarea>
- <dtml-elif "type=='lines'">
- <textarea name="<dtml-var id>:lines" rows="6" cols="35"><dtml-in
- "getProperty(id)"><dtml-var sequence-item html_quote><dtml-if
- sequence-end><dtml-else><dtml-var "'\n'"></dtml-if></dtml-in></textarea>
-
- <dtml-elif "type=='selection'">
-
- <dtml-if "hasProperty(select_variable)">
- <select name="<dtml-var id>">
- <dtml-in "getProperty(select_variable)">
- <option
- <dtml-if "_['sequence-item']==getProperty(id)">SELECTED</dtml-if>
- ><dtml-var sequence-item html_quote></option>
- </dtml-in>
- </select>
- <dtml-elif "_.has_key(select_variable)">
- <select name="<dtml-var id>">
- <dtml-in "_[select_variable]">
- <option
- <dtml-if "_['sequence-item']==getProperty(id)">SELECTED</dtml-if>
- ><dtml-var sequence-item html_quote></option>
- </dtml-in>
- </select>
- <dtml-else>
- No value for <dtml-var select_variable>.
- </dtml-if>
-
- <dtml-elif "type=='multiple selection'">
-
- <dtml-if "hasProperty(select_variable)">
- <select name="<dtml-var id>:list" multiple
- size="<dtml-var "_.min(7, _.len(getProperty(select_variable)))">">
- <dtml-in "getProperty(select_variable)">
- <option<dtml-if
- "getProperty(id) and (_['sequence-item'] in getProperty(id))"
- > SELECTED</dtml-if
- >><dtml-var sequence-item html_quote></option>
- </dtml-in>
- </select>
- <dtml-elif "_.has_key(select_variable)">
- <select name="<dtml-var id>:list" multiple
- size="<dtml-var "_.min(7, _.len(_[select_variable]))">">
- <dtml-in "_[select_variable]">
- <option<dtml-if
- "getProperty(id) and (_['sequence-item'] in getProperty(id))"
- > SELECTED</dtml-if
- >><dtml-var sequence-item html_quote></option>
- </dtml-in>
- </select>
- <dtml-else>
- No value for <dtml-var select_variable>.
- </dtml-if>
-
- <dtml-else>
- <em>Unknown property type</em>
- </dtml-if>
- <dtml-else>
- <table border="1">
- <tr><td><dtml-var "getProperty(id)" html_quote></td></tr>
- </table>
- </dtml-if>
- </td>
- <td align="left" valign="top">
- &dtml-type;
- </td>
- </tr>
- </dtml-in>
- <tr>
- <td colspan="2"> </td>
- <td align="left" valign="top">
- <input type="submit" name="manage_editProperties:method"
- value="Save Changes">
- <dtml-if property_extensible_schema__>
- <input type="submit" name="manage_delProperties:method" value="Delete">
- </td>
- <td>
- <dtml-comment>
- This needs some community review before exposing it officially.
- <input type="submit" name="manage_propertyTypeForm:method" value="Change Names/Types">
- </dtml-comment>
- </td>
- <dtml-else>
- <td> </td>
- </dtml-if>
- </td>
- </tr>
- </table>
-
- <dtml-else>
- <p>
- Properties allow you to assign simple values to Zope objects.
- There are currently no properties defined for this item.
- <dtml-if property_extensible_schema__>
- To add a property, click the "Add..." button.
- </dtml-if>
- </p>
-
- </dtml-if>
- </form>
-
- <dtml-if property_extensible_schema__>
- <a name="addpropform">
- <form action="<dtml-var URL1>/manage_addProperty" method="POST">
- <p>
- To add a new property, enter a name, type and value for the new
- property and click the "Add"
- button. For "selection" and "multiple selection"
- properties enter the name of a selection variable in the "Value"
- field. The selection variable is a property or method that returns a list
- of strings from which the selection(s) can be chosen.
- </p>
- <table>
- <tr>
- <th align="left" valign="top">Name</th>
- <td align="left" valign="top"><input type="text" name="id" size="20"></td>
- <th align="left" valign="top">Type</th>
- <td align="left" valign="top">
- <select name="type">
- <option>boolean</option>
- <option>date</option>
- <option>float</option>
- <option>int</option>
- <option>lines</option>
- <option>long</option>
- <option SELECTED>string</option>
- <option>text</option>
- <option>tokens</option>
- <option>selection</option>
- <option>multiple selection</option>
- </select>
- </td>
- </tr>
- <tr>
- <th align="left" valign="top">Value</th>
- <td colspan=2 align="left" valign="top">
- <input type="text" name="value" size="30">
- </td>
- <td align="right" valign="top">
- <input type="submit" value=" Add ">
- </td>
- </tr>
- </table>
- </form>
- </dtml-if>
-
- </body>
- </html>
-
-